// -----------------------------------------------------------------------
//  <copyright file="IRoleResource.cs" company="LiuliuSoft">
//      Copyright (c) 2022-2025 DaprPlus. All rights reserved.
//  </copyright>
//  <site>https://dapr.plus</site>
//  <last-editor>郭明锋</last-editor>
//  <last-date>2025/1/5 22:36</last-date>
// -----------------------------------------------------------------------

using DaprPlus.Domain.Entity;
using DaprPlus.Filters;

namespace DaprPlus.Authorization;

/// <summary>
/// 定义角色资源分配
/// </summary>
public interface IRoleResource : ILockable
{
    /// <summary>
    /// 获取 角色编号
    /// </summary>
    long RoleId { get; }

    /// <summary>
    /// 获取 资源编号
    /// </summary>
    long ResourceId { get; }

    /// <summary>
    /// 获取资源操作集合
    /// </summary>
    string[] GetOperations();

    /// <summary>
    /// 获取各操作的过滤条件组
    /// </summary>
    IDictionary<string, FilterGroup> GetFilterGroups();
}
